home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3591 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: comma.rhein.de!serpens!not-for-mail
  2. From: mlelstv@serpens.rhein.de (Michael van Elst)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Shared library open and close functions
  5. Date: 20 Feb 1996 21:05:23 +0100
  6. Organization: dis-
  7. Message-ID: <4gd9i3$hsh@serpens.rhein.de>
  8. References: <510.6619T1238T1638@Th0r.foo.bar> <DMvCKp.MD4@unx.sas.com> <1216.6624T889T380@sn.no>
  9. NNTP-Posting-Host: serpens.rhein.de
  10.  
  11. christon@sn.no (Christopher Naas) writes:
  12.  
  13. >When I link with lib:scmffp to use floating point in sprintf ('%.2f'), I get
  14. >an error from sc.lib. The library still works fine, though.
  15.  
  16. >Undefined symbols        First Referenced
  17. >__XCEXIT                 File 'LIB:sc.lib'
  18. >Enter a DEFINE value for __XCEXIT (default ___stub):
  19.  
  20. The problem is the raise() function that is called for math errors and which
  21. may call _CXBRK() and finally _XCEXIT() to terminate the program.
  22.  
  23. Nothing if this makes sense in a shared library.
  24.  
  25. A workaround is to include a function
  26.  
  27. __regargs void _CXBRK(void) { }
  28.  
  29. This solves the linker error.
  30.  
  31. Another possibility is to redefine the whole raise() function.
  32.  
  33. __regargs int raise(int s) { return 1; }
  34.  
  35. Regards,
  36. -- 
  37.                                 Michael van Elst
  38.  
  39. Internet: mlelstv@serpens.rhein.de
  40.                                 "A potential Snark may lurk in every tree."
  41.